package com.guoqiang.class_two.three;

public class CallPackage extends AbstractPackage implements CallServiceInterface {
    //成员变量
    private int talkTime; //用于描述通话时长
    private int messageNum;  //用于描述短信条数

    //无参构造方法
    public CallPackage() {
    }

    //有参构造方法
    public CallPackage(int talkTime, int messageNum, double mothPostage) {
        setTalkTime(talkTime);
        setMessageNum(messageNum);
        setMothPostage(mothPostage);
    }

    public double getTalkTime() {
        return talkTime;
    }

    public void setTalkTime(int talkTime) {
        this.talkTime = talkTime;
    }

    public int getMessageNum() {
        return messageNum;
    }

    public void setMessageNum(int messageNum) {
        this.messageNum = messageNum;
    }

    //成员方法 显示所有套餐信息
    @Override
    public void show(){
        System.out.println("通话时长：" + getTalkTime());
        System.out.println("短信条数：" + getMessageNum() );
        System.out.println("每月资费：" + getMothPostage());
    }

    @Override
    public void callService(int talkTime, MobileCard cardType) {
        System.out.println("通话套餐类实现通话服务接口！");
    }
}
